3.209 \(\int \frac {c+d x}{x (a+b x)} \, dx\)

Optimal. Leaf size=30 \[ \frac {c \log (x)}{a}-\frac {(b c-a d) \log (a+b x)}{a b} \]

[Out]

c*ln(x)/a-(-a*d+b*c)*ln(b*x+a)/a/b

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {72} \[ \frac {c \log (x)}{a}-\frac {(b c-a d) \log (a+b x)}{a b} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x)/(x*(a + b*x)),x]

[Out]

(c*Log[x])/a - ((b*c - a*d)*Log[a + b*x])/(a*b)

Rule 72

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {c+d x}{x (a+b x)} \, dx &=\int \left (\frac {c}{a x}+\frac {-b c+a d}{a (a+b x)}\right ) \, dx\\ &=\frac {c \log (x)}{a}-\frac {(b c-a d) \log (a+b x)}{a b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 29, normalized size = 0.97 \[ \frac {(a d-b c) \log (a+b x)}{a b}+\frac {c \log (x)}{a} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)/(x*(a + b*x)),x]

[Out]

(c*Log[x])/a + ((-(b*c) + a*d)*Log[a + b*x])/(a*b)

________________________________________________________________________________________

fricas [A]  time = 0.81, size = 29, normalized size = 0.97 \[ \frac {b c \log \relax (x) - {\left (b c - a d\right )} \log \left (b x + a\right )}{a b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/x/(b*x+a),x, algorithm="fricas")

[Out]

(b*c*log(x) - (b*c - a*d)*log(b*x + a))/(a*b)

________________________________________________________________________________________

giac [A]  time = 0.94, size = 32, normalized size = 1.07 \[ \frac {c \log \left ({\left | x \right |}\right )}{a} - \frac {{\left (b c - a d\right )} \log \left ({\left | b x + a \right |}\right )}{a b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/x/(b*x+a),x, algorithm="giac")

[Out]

c*log(abs(x))/a - (b*c - a*d)*log(abs(b*x + a))/(a*b)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 32, normalized size = 1.07 \[ \frac {c \ln \relax (x )}{a}-\frac {c \ln \left (b x +a \right )}{a}+\frac {d \ln \left (b x +a \right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)/x/(b*x+a),x)

[Out]

c*ln(x)/a+1/b*ln(b*x+a)*d-1/a*ln(b*x+a)*c

________________________________________________________________________________________

maxima [A]  time = 1.05, size = 30, normalized size = 1.00 \[ \frac {c \log \relax (x)}{a} - \frac {{\left (b c - a d\right )} \log \left (b x + a\right )}{a b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/x/(b*x+a),x, algorithm="maxima")

[Out]

c*log(x)/a - (b*c - a*d)*log(b*x + a)/(a*b)

________________________________________________________________________________________

mupad [B]  time = 0.35, size = 28, normalized size = 0.93 \[ \frac {c\,\ln \relax (x)}{a}-\ln \left (a+b\,x\right )\,\left (\frac {c}{a}-\frac {d}{b}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x)/(x*(a + b*x)),x)

[Out]

(c*log(x))/a - log(a + b*x)*(c/a - d/b)

________________________________________________________________________________________

sympy [A]  time = 0.47, size = 41, normalized size = 1.37 \[ \frac {c \log {\relax (x )}}{a} + \frac {\left (a d - b c\right ) \log {\left (x + \frac {- a c + \frac {a \left (a d - b c\right )}{b}}{a d - 2 b c} \right )}}{a b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)/x/(b*x+a),x)

[Out]

c*log(x)/a + (a*d - b*c)*log(x + (-a*c + a*(a*d - b*c)/b)/(a*d - 2*b*c))/(a*b)

________________________________________________________________________________________